<?=isset($quantityCodeMsg) ? $quantityCodeMsg : "" ?>
<?=isset($notify) ? $notify : "" ?>
<?=isset($warning) ? '<div class="alert alert-danger">'.$warning.'</div>' : "" ?>
<form class="form-horizontal" role="form" method="post" action="<?=site_url('exportw/make_export_form/'.$storage_id.'/'.$code.'/1') ?>">  
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label"></label>    
    <div class="col-sm-10">
      Kho <?=$storage->title ?> <span class="badge"><?=$storage->left_quantity ?></span>
      <button type="button" class="btn btn-info" onclick="thongTinKho()">Xem thông tin kho</button>
    </div>
  </div>    
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Tên người lập phiếu</label>
    <div class="col-sm-10">
      <input id="codeInput" type="text" name="maker" class="form-control" placeholder="Tên người lập phiếu" value="">
    </div>
  </div>    
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Lý do</label>
    <div class="col-sm-10">
      <textarea class="form-control" name="note" rows="3" placeholder="Lý do"></textarea>
    </div>
  </div>
  <input id="storageInput" type="hidden" name="storage" value="" />  
  <input id="storageInput" type="hidden" name="storage_id" value="<?=$storageId ?>" /> 
  <input type="hidden" name="codesInputE" value="<?=isset($codesInputE) ? $codesInputE : "" ?>" />
  <input id="storageId" type="hidden" name="storageId" value="<?=$storage->id ?>" /> 
  <input type="hidden" name="codesInput" value="<?=isset($codes_input) ? $codes_input : "" ?>" />
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
       <button type="submit" name="exportBtn" value="<?=$storage->id ?>" class="btn btn-primary">Lập phiếu</button>       
    </div>
  </div>
</form>

<?php  
	if(isset($codes_shown) && !empty($codes_shown)):
?>
<div class="table-responsive">
<table id="thong_tin_kho" class="table">
    <thead>
      <tr>
        <td>Mã sản phẩm</td>
        <td>Mã</td>
		<td>Màu</td>
		<td>Size</td>		        
      </tr>
    </thead>
    <tbody>
    <?php 
      if(isset($codes_shown) && !empty($codes_shown)):
      foreach($codes_shown as $key => $info): 
    ?>
      <tr>
        <td><?=$info['product'] ?></td>
        <td><?=$info['code'] ?></td>
		<td><?=$info['color'] ?></td>
		<td><?=$info['size'] ?></td>		        
      </tr>
    <?php 
      endforeach; 
      endif;
    ?>
    </tbody>
</table>
</div>
<?php endif; ?>